package com.ruoyi.service.production.impl;

import com.ruoyi.domain.production.MesWorkOrderProcess;
import com.ruoyi.mapper.production.MesWorkOrderProcessMapper;
import com.ruoyi.service.production.IMesWorkOrderProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 工单工序记录Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class MesWorkOrderProcessServiceImpl implements IMesWorkOrderProcessService
{
    @Autowired
    private MesWorkOrderProcessMapper mesWorkOrderProcessMapper;

    /**
     * 查询工单工序记录
     * 
     * @param processId 工单工序记录主键
     * @return 工单工序记录
     */
    @Override
    public MesWorkOrderProcess selectMesWorkOrderProcessByProcessId(Long processId)
    {
        return mesWorkOrderProcessMapper.selectMesWorkOrderProcessByProcessId(processId);
    }

    /**
     * 查询工单工序记录列表
     * 
     * @param mesWorkOrderProcess 工单工序记录
     * @return 工单工序记录
     */
    @Override
    public List<MesWorkOrderProcess> selectMesWorkOrderProcessList(MesWorkOrderProcess mesWorkOrderProcess)
    {
        return mesWorkOrderProcessMapper.selectMesWorkOrderProcessList(mesWorkOrderProcess);
    }

    /**
     * 根据工单ID查询工序记录列表
     * 
     * @param orderId 工单ID
     * @return 工单工序记录集合
     */
    @Override
    public List<MesWorkOrderProcess> selectProcessByOrderId(Long orderId)
    {
        return mesWorkOrderProcessMapper.selectProcessByOrderId(orderId);
    }

    /**
     * 根据工单编号查询工序记录列表
     * 
     * @param orderCode 工单编号
     * @return 工单工序记录集合
     */
    @Override
    public List<MesWorkOrderProcess> selectProcessByOrderCode(String orderCode)
    {
        return mesWorkOrderProcessMapper.selectProcessByOrderCode(orderCode);
    }

    /**
     * 根据设备ID查询工序记录列表
     * 
     * @param equipmentId 设备ID
     * @return 工单工序记录集合
     */
    @Override
    public List<MesWorkOrderProcess> selectProcessByEquipmentId(Long equipmentId)
    {
        return mesWorkOrderProcessMapper.selectProcessByEquipmentId(equipmentId);
    }

    /**
     * 根据操作工ID查询工序记录列表
     * 
     * @param workerId 操作工ID
     * @return 工单工序记录集合
     */
    @Override
    public List<MesWorkOrderProcess> selectProcessByWorkerId(Long workerId)
    {
        return mesWorkOrderProcessMapper.selectProcessByWorkerId(workerId);
    }

    /**
     * 根据状态查询工序记录列表
     * 
     * @param status 状态
     * @return 工单工序记录集合
     */
    @Override
    public List<MesWorkOrderProcess> selectProcessByStatus(String status)
    {
        return mesWorkOrderProcessMapper.selectProcessByStatus(status);
    }

    /**
     * 新增工单工序记录
     * 
     * @param mesWorkOrderProcess 工单工序记录
     * @return 结果
     */
    @Override
    public int insertMesWorkOrderProcess(MesWorkOrderProcess mesWorkOrderProcess)
    {
        return mesWorkOrderProcessMapper.insertMesWorkOrderProcess(mesWorkOrderProcess);
    }

    /**
     * 修改工单工序记录
     * 
     * @param mesWorkOrderProcess 工单工序记录
     * @return 结果
     */
    @Override
    public int updateMesWorkOrderProcess(MesWorkOrderProcess mesWorkOrderProcess)
    {
        return mesWorkOrderProcessMapper.updateMesWorkOrderProcess(mesWorkOrderProcess);
    }

    /**
     * 批量删除工单工序记录
     * 
     * @param processIds 需要删除的工单工序记录主键
     * @return 结果
     */
    @Override
    public int deleteMesWorkOrderProcessByProcessIds(Long[] processIds)
    {
        return mesWorkOrderProcessMapper.deleteMesWorkOrderProcessByProcessIds(processIds);
    }

    /**
     * 删除工单工序记录信息
     * 
     * @param processId 工单工序记录主键
     * @return 结果
     */
    @Override
    public int deleteMesWorkOrderProcessByProcessId(Long processId)
    {
        return mesWorkOrderProcessMapper.deleteMesWorkOrderProcessByProcessId(processId);
    }
}